Call _exit instead of exit from X error handlers
authorMatthias Clasen <mclasen@redhat.com>
Thu, 31 Mar 2011 23:59:00 +0000 (19:59 -0400)
committerMatthias Clasen <mclasen@redhat.com>
Thu, 31 Mar 2011 23:59:00 +0000 (19:59 -0400)
This is because running atexit() handlers from there is
usually bad news.
https://bugzilla.gnome.org/show_bug.cgi?id=646338

gdk/x11/gdkdisplay-x11.c
gdk/x11/gdkmain-x11.c

index 2911a3a6b737024561b39d6d033d09188f7e7d97..c4d776381af84f768cdd0ccef0b64514c2abbfb6 100644 (file)
@@ -2372,7 +2372,7 @@ _gdk_x11_display_error_event (GdkDisplay  *display,
 #else /* !G_ENABLE_DEBUG */
       g_warning ("%s\n", msg);
 
-      exit (1);
+      _exit (1);
 #endif /* G_ENABLE_DEBUG */
     }
 }
index e4cce5f9c65d4da1738a1e53d9a349dbc5ea2a02..dc57ce2d951794ad144e1cdc0d118540e3f962c4 100644 (file)
@@ -265,7 +265,7 @@ gdk_x_io_error (Display *display)
                  display ? DisplayString (display) : gdk_get_display_arg_name ());
     }
 
-  exit(1);
+  _exit (1);
 }
 
 /* X error handler. Keep the name the same because people are used to